home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / VISCAFE.BIN / Puppet.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-06-19  |  3.1 KB  |  83 lines

  1. package geo.emblaze;
  2.  
  3. class Puppet {
  4.    movieCast PuppetCast;
  5.    movieLayer PuppetLayer;
  6.    static final byte oPolygon = 0;
  7.    static final byte oLine = 1;
  8.    static final byte oOval = 2;
  9.    static final byte oRect = 3;
  10.    static final byte oRoundRect = 4;
  11.    static final byte oArc = 5;
  12.    static final byte oText = 6;
  13.    movieStruct movieInfo;
  14.  
  15.    Puppet(movieStruct var1, int var2, int var3) {
  16.       this.movieInfo = var1;
  17.       this.PuppetLayer = new movieLayer();
  18.       this.PuppetLayer.Mode = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].Mode;
  19.       this.PuppetLayer.mediaType = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].mediaType;
  20.       this.PuppetLayer.mediaId = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].mediaId;
  21.       this.PuppetLayer.XLoc = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].XLoc;
  22.       this.PuppetLayer.YLoc = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].YLoc;
  23.       this.PuppetLayer.LS1Id = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].LS1Id;
  24.       this.PuppetLayer.LS2Id = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].LS2Id;
  25.       this.PuppetLayer.Ink = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].Ink;
  26.       this.PuppetLayer.hRatio = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].hRatio;
  27.       this.PuppetLayer.vRatio = this.movieInfo.frameArchive[var2].layerArchive[var3 - 1].vRatio;
  28.       this.setLayerMedia(this.movieInfo.castArchive[this.PuppetLayer.mediaId - 1]);
  29.    }
  30.  
  31.    public void setLayerMedia(movieCast var1) {
  32.       this.PuppetCast = new movieCast();
  33.       this.PuppetCast.Id = var1.Id;
  34.       this.PuppetCast.numOfObjects = var1.numOfObjects;
  35.       this.PuppetCast.X = var1.X;
  36.       this.PuppetCast.Y = var1.Y;
  37.       this.PuppetCast.W = var1.W;
  38.       this.PuppetCast.H = var1.H;
  39.       this.PuppetCast.regX = var1.regX;
  40.       this.PuppetCast.regY = var1.regY;
  41.       this.PuppetCast.objectArchive = new movieObject[this.PuppetCast.numOfObjects];
  42.  
  43.       for(int var2 = 0; var2 < this.PuppetCast.numOfObjects; ++var2) {
  44.          this.PuppetCast.objectArchive[var2] = new movieObject();
  45.          this.PuppetCast.objectArchive[var2].Type = var1.objectArchive[var2].Type;
  46.          this.PuppetCast.objectArchive[var2].rectX1 = var1.objectArchive[var2].rectX1;
  47.          this.PuppetCast.objectArchive[var2].rectX2 = var1.objectArchive[var2].rectX2;
  48.          this.PuppetCast.objectArchive[var2].rectY1 = var1.objectArchive[var2].rectY1;
  49.          this.PuppetCast.objectArchive[var2].rectY2 = var1.objectArchive[var2].rectY2;
  50.          this.PuppetCast.objectArchive[var2].fillFore = var1.objectArchive[var2].fillFore;
  51.          this.PuppetCast.objectArchive[var2].fillBack = var1.objectArchive[var2].fillBack;
  52.          this.PuppetCast.objectArchive[var2].penFore = var1.objectArchive[var2].penFore;
  53.          this.PuppetCast.objectArchive[var2].penBack = var1.objectArchive[var2].penBack;
  54.          this.PuppetCast.objectArchive[var2].fillPat = var1.objectArchive[var2].fillPat;
  55.          this.PuppetCast.objectArchive[var2].penPat = var1.objectArchive[var2].penPat;
  56.          this.PuppetCast.objectArchive[var2].lineSize = var1.objectArchive[var2].lineSize;
  57.          this.PuppetCast.objectArchive[var2].numOfPoints = var1.objectArchive[var2].numOfPoints;
  58.          if (this.PuppetCast.objectArchive[var2].Type == 0) {
  59.             short var3 = this.PuppetCast.objectArchive[var2].numOfPoints;
  60.             this.PuppetCast.objectArchive[var2].X = new int[var3];
  61.             this.PuppetCast.objectArchive[var2].Y = new int[var3];
  62.  
  63.             for(int var4 = 0; var4 < this.PuppetCast.objectArchive[var2].numOfPoints; ++var4) {
  64.                this.PuppetCast.objectArchive[var2].X[var4] = var1.objectArchive[var2].X[var4];
  65.                this.PuppetCast.objectArchive[var2].Y[var4] = var1.objectArchive[var2].Y[var4];
  66.             }
  67.          }
  68.  
  69.          this.PuppetCast.objectArchive[var2].ovalW = var1.objectArchive[var2].ovalW;
  70.          this.PuppetCast.objectArchive[var2].ovalH = var1.objectArchive[var2].ovalH;
  71.          this.PuppetCast.objectArchive[var2].arcAngle = var1.objectArchive[var2].arcAngle;
  72.          this.PuppetCast.objectArchive[var2].startAngle = var1.objectArchive[var2].startAngle;
  73.          this.PuppetCast.objectArchive[var2].Color = var1.objectArchive[var2].Color;
  74.          this.PuppetCast.objectArchive[var2].Style = var1.objectArchive[var2].Style;
  75.          this.PuppetCast.objectArchive[var2].Size = var1.objectArchive[var2].Size;
  76.          this.PuppetCast.objectArchive[var2].Align = var1.objectArchive[var2].Align;
  77.          this.PuppetCast.objectArchive[var2].Font = var1.objectArchive[var2].Font;
  78.          this.PuppetCast.objectArchive[var2].Data = var1.objectArchive[var2].Data;
  79.       }
  80.  
  81.    }
  82. }
  83.